package work1.work6.wordnum;

import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;

public class HashMap {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] str = in.nextLine().split(" ");
        java.util.HashMap<String,Integer> hashMap = new java.util.HashMap<String,Integer>();
        for (int i=0;i<str.length;i++){
            boolean flag=hashMap.containsKey(str[i]);
            if (flag==false){
                hashMap.put(str[i],1);
            }
            else {
                hashMap.put(str[i],hashMap.get(str[i])+1);
            }
        }
        Set<String> set = hashMap.keySet();
        Iterator<String> integer = set.iterator();
        while (integer.hasNext()){
            String key = integer.next();
            System.out.println(key+":"+hashMap.get(key));
        }


    }
}
